package dyyx.dto;

public class KafkaReplicaInfo implements Comparable<KafkaReplicaInfo>{

	public String topic;
	public int partition;
	public long size;
	public long offsetLag;
	public boolean isFuture;

    public int compareTo(KafkaReplicaInfo o){
    	int tmp = topic.compareTo(o.topic);
    	if(tmp!=0){
    		return tmp;
    	}
    	
    	if(partition < o.partition){
    		return -1;
    	}
    	if(partition > o.partition){
    		return 1;
    	}
    	
    	return 0;
    }

}
